package com.sunny;

public class Main {

    public static void main(String[] args) {

        int[] arr = {1,2,5,10};
        int target = 100;
        int[] dp = new int[101];

        for(int i=0;i<arr.length;i++){
            for(int j=arr[i];j<=target;j++){
//                System.out.println(i+" " +j);
                dp[j] = dp[j-arr[i]] + 1;
            }
        }

        for(int j=0;j<=target;j++){
            System.out.print(dp[j] + " ");
        }

        System.out.println(dp[100]);

    }

}
